package com.yuan.aicodemother.service;

import com.mybatisflex.core.service.IService;
import com.yuan.aicodemother.model.dto.user.UserAddRequest;
import com.yuan.aicodemother.model.entity.User;
import com.yuan.aicodemother.model.vo.LoginUserVO;
import com.yuan.aicodemother.model.vo.UserVO;
import jakarta.servlet.http.HttpServletRequest;

/**
 * 用户 服务层。
 *
 * @author XueYuan
 */
public interface UserService extends IService<User> {


    LoginUserVO getLoginUserVO(User user);

    User getLoginUser(HttpServletRequest request);
    /**
     * 用户注销
     *
     * @param request
     * @return
     */
    boolean userLogout(HttpServletRequest request);

    /***
     * 用户登录
     * @param userAccount
     * @param userPassword
     * @param request
     * @return
     */
    LoginUserVO userLogin(String userAccount, String userPassword, HttpServletRequest request);

    /**
     * 新增用户
     * @param userAddRequest
     * @return
     */
    Boolean addUser(UserAddRequest userAddRequest);

    UserVO getUserVO(User user);

}
